package lab02.test21;

public class CharCounter {
    public static int counter(String s,char c){
        int count =0;
        for (int i=0;i<s.length();i++){
         if (s.charAt(i)==c){
             count++;
         }
        }
        return count;
    }
    public static void main(String[] args) {
        System.out.println(new CharCounter().counter("hello,world",'w') );
    }
}
